package cn.tedu._04mybatis.mapper;

import cn.tedu._04mybatis.pojo.entity.Comment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface CommentMapper {
    @Insert("INSERT INTO comment(content,created,user_id,weibo_id)values(#{content},#{created},#{userId},#{weiboId})")
    int insertComment(Comment comment);

    @Delete("DELETE FROM comment WHERE user_id=")
    int deleteComment(String username, String password);
}
//(SELECT id FROM user WHERE username=#{username} and password=#{password})